"""
清空缓存文件夹
"""
from core.utils import project_dir
import shutil


def purge_cache():
    # 遍历目录下所有文件
    for item in project_dir.rglob('*'):
        if not item.is_dir():
            continue
        if item.name == '__pycache__':
            shutil.rmtree(item)


if __name__ == "__main__":
    purge_cache()
